Optimal. Leaf size=44 \[ \frac {A \tanh ^{-1}(\sin (c+d x))}{a d}-\frac {(A-B) \sin (c+d x)}{d (a \cos (c+d x)+a)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2978, 12, 3770} \[ \frac {A \tanh ^{-1}(\sin (c+d x))}{a d}-\frac {(A-B) \sin (c+d x)}{d (a \cos (c+d x)+a)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2978
Rule 3770
Rubi steps
\begin {align*} \int \frac {(A+B \cos (c+d x)) \sec (c+d x)}{a+a \cos (c+d x)} \, dx &=-\frac {(A-B) \sin (c+d x)}{d (a+a \cos (c+d x))}+\frac {\int a A \sec (c+d x) \, dx}{a^2}\\ &=-\frac {(A-B) \sin (c+d x)}{d (a+a \cos (c+d x))}+\frac {A \int \sec (c+d x) \, dx}{a}\\ &=\frac {A \tanh ^{-1}(\sin (c+d x))}{a d}-\frac {(A-B) \sin (c+d x)}{d (a+a \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.27, size = 109, normalized size = 2.48 \[ \frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \left ((B-A) \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )+A \cos \left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{a d (\cos (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.65, size = 74, normalized size = 1.68 \[ \frac {{\left (A \cos \left (d x + c\right ) + A\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (A \cos \left (d x + c\right ) + A\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (A - B\right )} \sin \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.04, size = 71, normalized size = 1.61 \[ \frac {\frac {A \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {A \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} - \frac {A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.13, size = 78, normalized size = 1.77 \[ -\frac {A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}+\frac {A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}-\frac {A \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a d}+\frac {B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.82, size = 99, normalized size = 2.25 \[ \frac {A {\left (\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} + \frac {B \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.22, size = 42, normalized size = 0.95 \[ \frac {2\,A\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A-B\right )}{a\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A \sec {\left (c + d x \right )}}{\cos {\left (c + d x \right )} + 1}\, dx + \int \frac {B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}}{\cos {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________